home *** CD-ROM | disk | FTP | other *** search
- Path: dyn010.king-george.va.us.crosslink.net!miller
- From: miller@crosslink.net (Randall Miller)
- Newsgroups: comp.lang.c++
- Subject: Question on char to int and back
- Date: Sat, 3 Feb 1996 21:23:18 UNDEFINED
- Organization: CrossLink Internet Services
- Message-ID: <miller.1.00C350A1@crosslink.net>
- NNTP-Posting-Host: dyn010.king-george.va.us.crosslink.net
- X-Newsreader: Trumpet for Windows [Version 1.0 Rev B final beta #1]
-
- This might seem like a trivial question but I would like to know how I can go
- from reading in a char, placing it in a stack of int (ie)
- char c;
- c = cin.get()
- push(s,c);
- now if the char was a '+', it would be entered into the stack as 43.
- I know that a cout.put(c) will output it as a character but if I want
- to pop it from the stack and act on it as a character how do I
- convert it back to a character?
-
- I would be greatful for any help
-
- Randy
-